A Space-eecient Fast Prime Number Sieve
نویسندگان
چکیده
We present a new algorithm that nds all primes up to n using at most O(n= log log n) arithmetic operations and O(n=(log n log log n)) space. This algorithm is an improvement of a linear prime number sieve due to Pritchard. Our new algorithm matches the running time of the best previous prime number sieve, but uses less space by a factor of (log n). In addition, we present the results of our implementations of most known prime number sieves.
منابع مشابه
Trading Time for Space in Prime Number Sieves
A prime number sieve is an algorithm that nds the primes up to a bound n. We present four new prime number sieves. Each of these sieves gives new space complexity bounds for certain ranges of running times. In particular, we give a linear time sieve that uses only O(p n=(log log n) 2) bits of space, an O l (n= log log n) time sieve that uses O(n=((log n) l log log n)) bits of space, where l > 1...
متن کاملTwo Compact Incremental Prime Sieves
A prime sieve is an algorithm that finds the primes up to a bound n. We say that a prime sieve is incremental, if it can quickly determine if n+1 is prime after having found all primes up to n. We say a sieve is compact if it uses roughly √ n space or less. In this paper we present two new results: • We describe the rolling sieve, a practical, incremental prime sieve that takes O(n log logn) ti...
متن کاملThe Number Field Sieve
One of the most important and widely-studied questions in computational number theory is how to efficiently compute the prime factorizations of large integers. Among other applications, fast prime-factorization algorithms would break the widely-used RSA cryptosystem, and be of great interest in complexity theory. In particular, there is no algorithm which can factor an integer n in polynomial t...
متن کاملSieve Methods
Preface Sieve methods have had a long and fruitful history. The sieve of Eratosthenes (around 3rd century B.C.) was a device to generate prime numbers. Later Legendre used it in his studies of the prime number counting function π(x). Sieve methods bloomed and became a topic of intense investigation after the pioneering work of Viggo Brun (see [Bru16],[Bru19], [Bru22]). Using his formulation of ...
متن کاملA Tale of Two Sieves
I t is the best of times for the game of factoring large numbers into their prime factors. In 1970 it was barely possible to factor “hard” 20-digit numbers. In 1980, in the heyday of the Brillhart-Morrison continued fraction factoring algorithm, factoring of 50-digit numbers was becoming commonplace. In 1990 my own quadratic sieve factoring algorithm had doubled the length of the numbers that c...
متن کامل